﻿@using System.Collections
@model HandleErrorInfo
@{
    ViewBag.Title = "พบปัญหาในการทำงาน";
    ViewBag.NotHideScrollBar = "Yes";
    Layout = "~/Views/Shared/_LayoutForNonLogin.cshtml";
}


<table style="width: 100%; height: 500px; font-size: medium; background: url(/Images/Pictures/bar_white.png) right bottom no-repeat;">
    <tr>
        <td></td>
        <td style="vertical-align: top;width: 700px;">
            <h3>@ViewBag.Title</h3> 
            <span style="color: white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; @Model.ControllerName / @Model.ActionName </span>
            
            @if (Model.Exception.Data.Count > 0)
            {
                <text> 
                    <strong>&#8226; ข้อมูลที่แนบมาจากฟังก์ชั่น : </strong><br/>
                    <ol>
                        @foreach (DictionaryEntry kv in Model.Exception.Data)
                        {
                            <li style="color: white">@Html.Raw(kv.Key + ": " + kv.Value)</li>
                        }
                    </ol>
                </text>
            }
            <hr /> 
            <div id="btnShowHide" style="cursor:pointer; font-weight: bold">&#8226; Error Stack</div>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <div id="paragraph" class="history_block" style="display: none;color: black; margin-left: 24px;background-color:  rgba(255, 255, 255, 0.5);font-family: century gothic; font-size: small; padding: 10px 10px 10px 10px"> 
                @Html.Raw(Model.Exception.Message)<br/>
                @Html.Raw(Model.Exception.StackTrace.Replace("\r", "<br/>")) 
            </div>  
        </td>
    </tr> 
    <tr>
        <td>
            
        </td>
        <td valign="bottom" style="height: 30px">
            @Html.ActionLink("กลับไปหน้าหลัก", "Index", "Home", new {style="font-size:large;"})
        </td>
        
    </tr>
</table>
  
@section scripts
{
    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/modernizr")
    @Scripts.Render("~/bundles/jqueryui")
    @Scripts.Render("~/bundles/jquerytablesorter")
    <script type="text/javascript">
        var myTimer;
        var myWindow;
        $(document).ready(function() {
             
            $("#btnShowHide").click(function() {
                $("#paragraph").slideToggle();
            });
        });
    </script>

}